package com.mask.im.common.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.mask.im.common.constant.CommonConstant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.beans.Transient;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
 * 用户详情信息
 * @author jian
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserDetailsDTO {
	//id
	private Integer id;

	//昵称
	private String nickName;

	//账号
	private String username;

	//邮箱
	private String email;

	//手机号
	private String phone;

	//密码
	private String password;

	//头像
	private String avatar;

	//简介
	private String intro;

	//性别
	private Integer gender;

	//ip
	private String ipAddress;

	//位置
	private String ipSource;

	//是否禁用(0禁用，1不禁用)
	private Integer disable;

	//操作系统
	private String os;

	//浏览器
	private String browser;

	//角色
	private List<String> roles;

	//序列化不然报错
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	private LocalDateTime expireTime;

	//序列化不然报错
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	private LocalDateTime lastLoginTime;
}
